<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>李山投资集团-入职登记表</title>
  <link rel="stylesheet" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
  <link rel="stylesheet" href="./asset/css/foundation-datepicker.css">
  <link rel="stylesheet" href="./asset/css/entry-register-form.css">
</head>

<body>
  <div class="main">
    <div class="button">
      <button id="submit">提交</button>
      <button id="download">导出</button>
    </div>
    <div id="pdf">
      <div class="clearfix logo">
        <div>
          <img src="./asset/images/logo.png" alt="中国·李山投资集团">
        </div>
      </div>
      <div class="box">
        <div class="title">入职登记表</div>
        <div class="num">LSHR-02-A</div>
        <div class="clearfix namephoto">
          <div class="name">
            <div class="clearfix">
              <div class="td1">公司</div>
              <div class="td2">合肥聚财科技</div>
              <div class="td1"><span class="required">*</span>录取岗位</div>
              <div class="td1">
                <input type="text" class="input" id="station">
              </div>
              <div class="td1"><span class="required">*</span>入职时间</div>
              <div class=" td1">
                <input type="text" class="input" id="entryDate">
              </div>
            </div>
            <div class="clearfix">
              <div class="td1"><span class="required">*</span>姓名</div>
              <div class=" td2">
                <input type="text" class="input" id="username">
              </div>
              <div class="td1"><span class="required">*</span>性别</div>
              <div class=" td1">
                <input type="text" class="input" id="sex">
              </div>
              <div class="td1"><span class="required">*</span>出生日期</div>
              <div class=" td1">
                <input type="text" class="input" id="birthDate">
              </div>
            </div>
            <div class="clearfix">
              <div class="td1"><span class="required">*</span>籍贯</div>
              <div class=" td2">
                <input type="text" class="input" id="lnative">
              </div>
              <div class="td1"><span class="required">*</span>民族</div>
              <div class=" td1">
                <input type="text" class="input" id="nation">
              </div>
              <div class="td1"><span class="required">*</span>最高学历</div>
              <div class=" td1">
                <input type="text" class="input" id="education">
              </div>
            </div>
            <div class="clearfix">
              <div class="td1 h60"><span class="required">*</span>现居住地</div>
              <div class=" td2 h60">
                <textarea class="input" id="address"></textarea>
              </div>
              <div class="td1 h60"><span class="required">*</span>户 籍</div>
              <div class=" td1 h60 census">
                <label for="census1">
                  <input type="radio" name="register" id="census1" class="radio" value="1" />
                  <span>农</span>
                </label>
                <label for="census2">
                  <input type="radio" name="register" id="census2" class="radio" value="2" />
                  <span>非农</span>
                </label>
              </div>
              <div class="td1 h60"><span class="required">*</span>婚姻状况</div>
              <div class=" td1 h60 census">
                <label for="marriage1">
                  <input type="radio" name="marriage" id="marriage1" class="radio" value="1" />
                  <span>未婚</span>
                </label>
                <label for="marriage2">
                  <input type="radio" name="marriage" id="marriage2" class="radio" value="2" />
                  <span>已婚</span>
                </label>
              </div>
            </div>
          </div>
          <div class="photo">照片粘贴处</div>
        </div>
        <div class="clearfix">
          <div class="td1"><span class="required">*</span>体重(kg)</div>
          <div class="td2">
            <input type="text" class="input" id="weight">
          </div>
          <div class="td1"><span class="required">*</span>政治面貌</div>
          <div class="td1">
            <!-- <input type="text" class="input" id="poliStatus"> -->
            <select id="poliStatus">
              <option value="群众">群众</option>
              <option value="团员">团员</option>
              <option value="党员">党员</option>
              <option value="其他">其他</option>
            </select>
          </div>
          <div class="td1"><span class="required">*</span>健康状况</div>
          <div class="td3 norb">
            <input type="text" class="input" id="health">
          </div>
          <div class="td1"><span class="required">*</span>身高(cm)</div>
          <div class="td2">
            <input type="text" class="input" id="height">
          </div>
          <div class="td1"><span class="required">*</span>E-mail</div>
          <div class="td1">
            <input type="text" class="input" id="mail">
            <textarea class="input" id="mail"></textarea>
          </div>
          <div class="td1"><span class="required">*</span>身份证号</div>
          <div class="td3 norb">
            <input type="text" class="input" id="idCard">
          </div>
          <div class="td1 h60"><span class="required">*</span>联系电话</div>
          <div class="td2 h60">
            <textarea class="input" id="phone"></textarea>
          </div>
          <div class="td1 h60"><span class="required">*</span>微信号/QQ号</div>
          <div class="td1 h60">
            <textarea class="input" id="WXQQnum"></textarea>
          </div>
          <div class="td1 h60">驾驶执照</div>
          <div class="td3 norb h60">
            <input type="text" class="input" id="driveCard">
          </div>
          <div class="td1 h60"><span class="required">*</span>兴趣爱好</div>
          <div class="td8 norb h60">
            <textarea class="input" id="hobby"></textarea>
          </div>
        </div>
        <div class="line"></div>
        <div class="clearfix">
          <div class="td1 h120"><span class="required">*</span>教育背景</div>
          <div class="td8 norb">
            <div class="td2">时间</div>
            <div class="td1">学校</div>
            <div class="td2">专业</div>
            <div class="td3 norb">取得证书</div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="eduDate1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="eduSchool">
            </div>
            <div class="td2">
              <input type="text" class="input" id="eduMajor1">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="eduCert1">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="eduDate2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="eduSchoo2">
            </div>
            <div class="td2">
              <input type="text" class="input" id="eduMajor2">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="eduCert2">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="eduDate3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="eduSchoo3">
            </div>
            <div class="td2">
              <input type="text" class="input" id="eduMajor3">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="eduCert3">
            </div>
          </div>
        </div>
        <div class="line"></div>
        <div class="clearfix">
          <div class="td1 h120">培训经历</div>
          <div class="td8 norb">
            <div class="td2">培训起始时间</div>
            <div class="td1">培训课程</div>
            <div class="td2">课程内容概述</div>
            <div class="td3 norb">培训讲师</div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="trainDate1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="course1">
            </div>
            <div class="td2">
              <input type="text" class="input" id="trainContent1">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="trainLec1">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="trainDate2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="course2">
            </div>
            <div class="td2">
              <input type="text" class="input" id="trainContent2">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="trainLec2">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="trainDate3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="course3">
            </div>
            <div class="td2">
              <input type="text" class="input" id="trainContent3">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="trainLec3">
            </div>
          </div>
        </div>
        <div class="line"></div>
        <div class="clearfix">
          <div class="td1 h150"><span class="required">*</span>工作经历</div>
          <div class="td8 norb">
            <div class="td2">任职时间</div>
            <div class="td1">任职单位</div>
            <div class="td1">所在岗位</div>
            <div class="td1">离职原因</div>
            <div class="td1">最后薪资</div>
            <div class="td1">证明人</div>
            <div class="td1 norb">电话</div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="workDate1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workUnit1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workStation1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="outCause1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workPay1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="certifier1">
            </div>
            <div class="td1 norb">
              <input type="text" class="input" id="phone1">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="workDate2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workUnit2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workStation2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="outCause2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workPay2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="certifier2">
            </div>
            <div class="td1 norb">
              <input type="text" class="input" id="phone2">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="workDate3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workUnit3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workStation3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="outCause3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workPay3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="certifier3">
            </div>
            <div class="td1 norb">
              <input type="text" class="input" id="phone3">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td2">
              <input type="text" class="input" id="workDate4">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workUnit4">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workStation4">
            </div>
            <div class="td1">
              <input type="text" class="input" id="outCause4">
            </div>
            <div class="td1">
              <input type="text" class="input" id="workPay4">
            </div>
            <div class="td1">
              <input type="text" class="input" id="certifier4">
            </div>
            <div class="td1 norb">
              <input type="text" class="input" id="phone4">
            </div>
          </div>
        </div>
        <div class="line"></div>
        <div class="clearfix">
          <div class="td1 h120"><span class="required">*</span>家庭成员</div>
          <div class="td8 norb">
            <div class="td1">关系</div>
            <div class="td1">姓名</div>
            <div class="td1">生日</div>
            <div class="td1">工作单位</div>
            <div class="td1">联系电话</div>
            <div class="td3 norb">评价</div>
          </div>
          <div class="td8 norb">
            <div class="td1">
              <input type="text" class="input" id="relation1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rName1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rBirth1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rUnit1">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rPhone1">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="rEval1">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td1">
              <input type="text" class="input" id="relation2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rName2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rBirth2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rUnit2">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rPhone2">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="rEval2">
            </div>
          </div>
          <div class="td8 norb">
            <div class="td1">
              <input type="text" class="input" id="relation3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rName3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rBirth3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rUnit3">
            </div>
            <div class="td1">
              <input type="text" class="input" id="rPhone3">
            </div>
            <div class="td3 norb">
              <input type="text" class="input" id="rEval3">
            </div>
          </div>
        </div>
        <div class="line"></div>
        <div class="clearfix">
          <div class="td3 norb"><span class="required">*</span>紧急联络人：
            <input type="text" class="jjllr" id="ecPeopLe">
          </div>
          <div class="td3 norb"><span class="required">*</span>关系：
            <input type="text" class="jjllr" id="ecRelation">
          </div>
          <div class="td3 norb"><span class="required">*</span>联系电话：
            <input type="text" class="jjllr" id="ecPhone">
          </div>
        </div>
        <div class="tip">我保证上述表格中所填内容完全真实，如有虚假愿承担一切责任。</div>
        <div class="sign">本人签名/日期：
          <input type="text" class="signinput">
        </div>
      </div>
    </div>
    <div id="upload">
      <i>文件上传</i>
      <div><span><span class="required">*</span>上传学历证明</span>
        <input type="file" name="education" id="education" class="fileupload">
      </div>
      <div><span><span class="required">*</span>上传身份证复印件</span>
        <input type="file" name="IDcard" id="IDcard" class="fileupload">
      </div>
      <div><span><span class="required">*</span>上传银行卡复印件</span>
        <input type="file" name="bankCard" id="bankCard" class="fileupload">
      </div>
      <div><span>上传离职证明（非必须）</span>
        <input type="file" name="departure" id="departure" class="fileupload">
      </div>
      <!-- <button id="uploadbtn">点击上传</button> -->
    </div>
  </div>
  <script src="./js/jquery-1.8.3.min.js"></script>
  <script src="./js/foundation-datepicker.js"></script>
  <script>
    var type = /type=(\w+)/gi.exec(window.location.href);
    var empid = /empid=(\w+)/gi.exec(window.location.href);
    var username = /username=([\u4E00-\u9FA5]+)/gi.exec(decodeURIComponent(window.location.href));
    var phone = /phone=(\w+)/gi.exec(window.location.href);
    // var baseUrl = 'http://192.168.22.45:5526/';
    // var baseUrl = 'http://192.168.3.26:5526/';
    var baseUrl = 'http://report.wsloan.com:5526/EmployeeSystem';

    if (username) {
      username = username[1];
    }
    if (phone) {
      phone = phone[1];
    }
    console.log(username,phone);
    /*if (empid) {
      empid = empid[1];
    } else {
      // 没有empid的处理
      $('.input,.radio,.jjllr,.signinput,.fileupload').attr('disabled', 'true');
    }
*/

    // 判断是编辑还是预览
    if (type) {
      type = type[1];
      if (type == 'edit') {
        $('#submit').show();

        // 编辑状态下可选择入职日期和出现日期
        $('#entryDate').fdatepicker({
          format: 'yyyy-mm-dd',
        });

        $('#birthDate').fdatepicker({
          format: 'yyyy-mm-dd',
        });
      } else if (type == 'preview') {
        // if (empid) {
        // 预览 获取数据
        $.ajax({
          url: baseUrl + 'show/user/regreport.htmls',
          type: 'post',
          dataType: 'json',
          data: {
            // empid: empid,
            username: username,
            phone: phone
          },
          success: function(data) {
            // console.log(data);
            if (data.code == 0 && data.data.length) {
              var msg = data.data[0];
              console.log(msg);
              $('#station').val(msg.station);
              $('#entryDate').val(msg.entryDate);
              $('#username').val(msg.username);
              $('#sex').val(msg.sex);
              $('#birthDate').val(msg.birthDate);
              $('#lnative').val(msg.lnative);
              $('#nation').val(msg.nation);
              $('#education').val(msg.education);
              $('#address').val(msg.address);
              $('.radio[name="register"][value=' + msg.register + ']').attr('checked', 'checked');
              $('.radio[name="marriage"][value=' + msg.marriage + ']').attr('checked', 'checked');
              $('#weight').val(msg.weight);
              $('#poliStatus').val(msg.poliStatus);
              $('#health').val(msg.health);
              $('#height').val(msg.height);
              $('#mail').val(msg.mail);
              $('#idCard').val(msg.IDcard);
              $('#phone').val(msg.phone);
              $('#WXQQnum').val(msg.WXQQnum);
              $('#driveCard').val(msg.driveCard);
              $('#hobby').val(msg.hobby);
              $('#eduDate1').val(msg.eduDate1);
              $('#eduSchool').val(msg.eduSchool);
              $('#eduMajor1').val(msg.eduMajor1);
              $('#eduCert1').val(msg.eduCert1);
              $('#eduDate2').val(msg.eduDate2);
              $('#eduSchoo2').val(msg.eduSchoo2);
              $('#eduMajor2').val(msg.eduMajor2);
              $('#eduCert2').val(msg.eduCert2);
              $('#eduDate3').val(msg.eduDate3);
              $('#eduSchoo3').val(msg.eduSchoo3);
              $('#eduMajor3').val(msg.eduMajor3);
              $('#eduCert3').val(msg.eduCert3);
              $('#trainDate1').val(msg.trainDate1);
              $('#course1').val(msg.trainCourse1);
              $('#trainContent1').val(msg.trainContent1);
              $('#trainLec1').val(msg.trainLec1);
              $('#trainDate2').val(msg.trainDate2);
              $('#course2').val(msg.trainCourse2);
              $('#trainContent2').val(msg.trainContent2);
              $('#trainLec2').val(msg.trainLec2);
              $('#trainDate3').val(msg.trainDate3);
              $('#course3').val(msg.trainCourse3);
              $('#trainContent3').val(msg.trainContent3);
              $('#trainLec3').val(msg.trainLec3);
              $('#workDate1').val(msg.workDate1);
              $('#workUnit1').val(msg.workUnit1);
              $('#workStation1').val(msg.workStation1);
              $('#outCause1').val(msg.outCause1);
              $('#workPay1').val(msg.workPay1);
              $('#certifier1').val(msg.certifier1);
              $('#phone1').val(msg.phone1);
              $('#workDate2').val(msg.workDate2);
              $('#workUnit2').val(msg.workUnit2);
              $('#workStation2').val(msg.workStation2);
              $('#outCause2').val(msg.outCause2);
              $('#workPay2').val(msg.workPay2);
              $('#certifier2').val(msg.certifier2);
              $('#phone2').val(msg.phone2);
              $('#workDate3').val(msg.workDate3);
              $('#workUnit3').val(msg.workUnit3);
              $('#workStation3').val(msg.workStation3);
              $('#outCause3').val(msg.outCause3);
              $('#workPay3').val(msg.workPay3);
              $('#certifier3').val(msg.certifier3);
              $('#phone3').val(msg.phone3);
              $('#workDate4').val(msg.workDate4);
              $('#workUnit4').val(msg.workUnit4);
              $('#workStation4').val(msg.workStation4);
              $('#outCause4').val(msg.outCause4);
              $('#workPay4').val(msg.workPay4);
              $('#certifier4').val(msg.certifier4);
              $('#phone4').val(msg.phone4);
              $('#relation1').val(msg.relation1);
              $('#rName1').val(msg.rName1);
              $('#rBirth1').val(msg.rBirth1);
              $('#rUnit1').val(msg.rUnit1);
              $('#rPhone1').val(msg.rPhone1);
              $('#rEval1').val(msg.rEval1);
              $('#relation2').val(msg.relation2);
              $('#rName2').val(msg.rName2);
              $('#rBirth2').val(msg.rBirth2);
              $('#rUnit2').val(msg.rUnit2);
              $('#rPhone2').val(msg.rPhone2);
              $('#rEval2').val(msg.rEval2);
              $('#relation3').val(msg.relation3);
              $('#rName3').val(msg.rName3);
              $('#rBirth3').val(msg.rBirth3);
              $('#rUnit3').val(msg.rUnit3);
              $('#rPhone3').val(msg.rPhone3);
              $('#rEval3').val(msg.rEval3);
              $('#ecPeopLe').val(msg.ECpeople);
              $('#ecRelation').val(msg.ECrelation);
              $('#ecPhone').val(msg.ECphone);
            }
          },
          error: function(error) {
            console.log(error);
          }
        });
        // }
        $('.input,.radio,.jjllr,.signinput,.fileupload').attr('disabled', 'true');
        $('#download').show();
      } else {
        // 非法参数值处理
      }
    } else {
      // 没有type值的处理
      $('.input,.radio,.jjllr,.signinput,.fileupload').attr('disabled', 'true');
    }

    var uploadFiles = {};
    // 文件选择
    $('.fileupload').on('change', function() {
      var file = this.files[0];
      if (file) {
        var size = file.size;
        if (size / 1024 / 1024 > 1) {
          alert('文件大小必须小于等于1M');
          this.value = '';
        } else {
          uploadFiles[$(this).attr('id')] = file;
        }
      }
    });

    /*// 提交文件
    $('#uploadbtn').on('click', function(e) {
      e.stopPropagation();
      e.preventDefault();

    });*/

    // 提交
    $('#submit').on('click', function(e) {
      e.stopPropagation();
      e.preventDefault();
      var station = $('#station').val();
      var entryDate = $('#entryDate').val();
      var username = $('#username').val();
      var sex = $('#sex').val();
      var birthDate = $('#birthDate').val();
      var lnative = $('#lnative').val();
      var nation = $('#nation').val();
      var education = $('#education').val();
      var address = $('#address').val();
      var register = $(".radio[name='register']:checked").val();
      var marriage = $(".radio[name='marriage']:checked").val();
      var weight = $('#weight').val();
      var poliStatus = $('#poliStatus').val();
      var health = $('#health').val();
      var height = $('#height').val();
      var mail = $('#mail').val();
      var idCard = $('#idCard').val();
      var phone = $('#phone').val();
      var WXQQnum = $('#WXQQnum').val();
      var driveCard = $('#driveCard').val();
      var hobby = $('#hobby').val();
      var eduDate1 = $('#eduDate1').val();
      var eduSchool = $('#eduSchool').val();
      var eduMajor1 = $('#eduMajor1').val();
      var eduCert1 = $('#eduCert1').val();
      var eduDate2 = $('#eduDate2').val();
      var eduSchoo2 = $('#eduSchoo2').val();
      var eduMajor2 = $('#eduMajor2').val();
      var eduCert2 = $('#eduCert2').val();
      var eduDate3 = $('#eduDate3').val();
      var eduSchoo3 = $('#eduSchoo3').val();
      var eduMajor3 = $('#eduMajor3').val();
      var eduCert3 = $('#eduCert3').val();
      var trainDate1 = $('#trainDate1').val();
      var course1 = $('#course1').val();
      var trainContent1 = $('#trainContent1').val();
      var trainLec1 = $('#trainLec1').val();
      var trainDate2 = $('#trainDate2').val();
      var course2 = $('#course2').val();
      var trainContent2 = $('#trainContent2').val();
      var trainLec2 = $('#trainLec2').val();
      var trainDate3 = $('#trainDate3').val();
      var course3 = $('#course3').val();
      var trainContent3 = $('#trainContent3').val();
      var trainLec3 = $('#trainLec3').val();
      var workDate1 = $('#workDate1').val();
      var workUnit1 = $('#workUnit1').val();
      var workStation1 = $('#workStation1').val();
      var outCause1 = $('#outCause1').val();
      var workPay1 = $('#workPay1').val();
      var certifier1 = $('#certifier1').val();
      var phone1 = $('#phone1').val();
      var workDate2 = $('#workDate2').val();
      var workUnit2 = $('#workUnit2').val();
      var workStation2 = $('#workStation2').val();
      var outCause2 = $('#outCause2').val();
      var workPay2 = $('#workPay2').val();
      var certifier2 = $('#certifier2').val();
      var phone2 = $('#phone2').val();
      var workDate3 = $('#workDate3').val();
      var workUnit3 = $('#workUnit3').val();
      var workStation3 = $('#workStation3').val();
      var outCause3 = $('#outCause3').val();
      var workPay3 = $('#workPay3').val();
      var certifier3 = $('#certifier3').val();
      var phone3 = $('#phone3').val();
      var workDate4 = $('#workDate4').val();
      var workUnit4 = $('#workUnit4').val();
      var workStation4 = $('#workStation4').val();
      var outCause4 = $('#outCause4').val();
      var workPay4 = $('#workPay4').val();
      var certifier4 = $('#certifier4').val();
      var phone4 = $('#phone4').val();
      var relation1 = $('#relation1').val();
      var rName1 = $('#rName1').val();
      var rBirth1 = $('#rBirth1').val();
      var rUnit1 = $('#rUnit1').val();
      var rPhone1 = $('#rPhone1').val();
      var rEval1 = $('#rEval1').val();
      var relation2 = $('#relation2').val();
      var rName2 = $('#rName2').val();
      var rBirth2 = $('#rBirth2').val();
      var rUnit2 = $('#rUnit2').val();
      var rPhone2 = $('#rPhone2').val();
      var rEval2 = $('#rEval2').val();
      var relation3 = $('#relation3').val();
      var rName3 = $('#rName3').val();
      var rBirth3 = $('#rBirth3').val();
      var rUnit3 = $('#rUnit3').val();
      var rPhone3 = $('#rPhone3').val();
      var rEval3 = $('#rEval3').val();
      var ecPeopLe = $('#ecPeopLe').val();
      var ecRelation = $('#ecRelation').val();
      var ecPhone = $('#ecPhone').val();
      if (!station || !entryDate || !username || !sex || !birthDate || !lnative || !nation || !education || !address || !register || !marriage || !weight || !poliStatus || !health || !height || !mail || !idCard || !phone || !WXQQnum || !eduDate1 || !eduSchool || !eduMajor1 || !eduCert1 || !workDate1 || !workUnit1 || !workStation1 || !outCause1 || !workPay1 || !relation1 || !rName1 || !rBirth1 || !rUnit1 || !rPhone1 || !rEval1 || !ecPeopLe || !ecRelation || !ecPhone || !uploadFiles['education'] || !uploadFiles['IDcard'] || !uploadFiles['bankCard']) {
        alert('还有未填写的项目\n打*号的为必填项\n注意需要上传的文件项');
        return false;
      }
      $.ajax({
        url: baseUrl + "insert/register.htmls",
        type: 'post',
        dataType: 'json',
        data: {
          // empid: empid,
          company: '合肥聚财科技',
          station: station,
          entryDate: entryDate,
          username: username,
          sex: sex,
          birthDate: birthDate,
          lnative: lnative,
          nation: nation,
          education: education,
          address: address,
          register: register,
          marriage: marriage,
          weight: weight,
          poliStatus: poliStatus,
          health: health,
          height: height,
          mail: mail,
          idCard: idCard,
          phone: phone,
          WXQQnum: WXQQnum,
          driveCard: driveCard,
          hobby: hobby,
          eduDate1: eduDate1,
          eduSchool: eduSchool,
          eduMajor1: eduMajor1,
          eduCert1: eduCert1,
          eduDate2: eduDate2,
          eduSchoo2: eduSchoo2,
          eduMajor2: eduMajor2,
          eduCert2: eduCert2,
          eduDate3: eduDate3,
          eduSchoo3: eduSchoo3,
          eduMajor3: eduMajor3,
          eduCert3: eduCert3,
          trainDate1: trainDate1,
          course1: course1,
          trainContent1: trainContent1,
          trainLec1: trainLec1,
          trainDate2: trainDate2,
          course2: course2,
          trainContent2: trainContent2,
          trainLec2: trainLec2,
          trainDate3: trainDate3,
          course3: course3,
          trainContent3: trainContent3,
          trainLec3: trainLec3,
          workDate1: workDate1,
          workUnit1: workUnit1,
          workStation1: workStation1,
          outCause1: outCause1,
          workPay1: workPay1,
          certifier1: certifier1,
          phone1: phone1,
          workDate2: workDate2,
          workUnit2: workUnit2,
          workStation2: workStation2,
          outCause2: outCause2,
          workPay2: workPay2,
          certifier2: certifier2,
          phone2: phone2,
          workDate3: workDate3,
          workUnit3: workUnit3,
          workStation3: workStation3,
          outCause3: outCause3,
          workPay3: workPay3,
          certifier3: certifier3,
          phone3: phone3,
          workDate4: workDate4,
          workUnit4: workUnit4,
          workStation4: workStation4,
          outCause4: outCause4,
          workPay4: workPay4,
          certifier4: certifier4,
          phone4: phone4,
          relation1: relation1,
          rName1: rName1,
          rBirth1: rBirth1,
          rUnit1: rUnit1,
          rPhone1: rPhone1,
          rEval1: rEval1,
          relation2: relation2,
          rName2: rName2,
          rBirth2: rBirth2,
          rUnit2: rUnit2,
          rPhone2: rPhone2,
          rEval2: rEval2,
          relation3: relation3,
          rName3: rName3,
          rBirth3: rBirth3,
          rUnit3: rUnit3,
          rPhone3: rPhone3,
          rEval3: rEval3,
          ecPeopLe: ecPeopLe,
          ecRelation: ecRelation,
          ecPhone: ecPhone,
        },
        success: function(data) {
          // console.log(data);
          // if (data.code == 0) {
          // alert(data.msg);
          // }
          // 提交文件
          console.log(uploadFiles);
          // 如果没有离职证明就上传身份证复印件
          if (!uploadFiles['departure']) {
            uploadFiles['departure'] = uploadFiles['IDcard'];
          }
          var formData = new FormData();
          for (file in uploadFiles) {
            // console.log(uploadFiles[file]);
            formData.append('file', uploadFiles[file]);
          }
          formData.append('phone', $('#phone').val());
          $.ajax({
            url: baseUrl + 'new/batch/upload.htmls',
            type: 'POST',
            dataType: 'text',
            data: formData,
            async: true,
            cache: false,
            contentType: false,
            processData: false,
            success: function(data) {
              // console.log(data);
              alert(data);
            },
            error: function(error) {
              alert('文件提交异常，请稍后重试');
            }
          });
        },
        error: function(error) {
          console.log(error);
          alert('表格提交异常，请稍后重试');
        }
      });

    });
  </script>
  <script src="./js/jspdf.debug.js"></script>
  <!-- <script src="./js/jspdf.min.js"></script> -->
  <script src="./js/download.js"></script>
</body>

</html>
